using QFramework;
using UnityEngine;

namespace ProjectSurvivor
{
    public abstract class GameplayObject : ViewController
    {
        public bool InScreen{get;set;}
        protected abstract Collider2D Collider2D { get; }
        void OnBecameVisible()//显现时
        {
            Collider2D.enabled=true;
            InScreen=true;
        }
        void OnBecameInvisible()//隐藏时
        {
            Collider2D.enabled=false;
            InScreen=false;
        }
    }
}